package com.ui;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Dialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.wb.swt.SWTResourceManager;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Group;

/**
* @ClassName: NewUpdates
* @Description: TODO
* @author alterhu2020@gmail.com
* @date Feb 15, 2014 10:10:06 PM
* 
*/

public class NewUpdates extends Dialog {

	protected Object result;
	protected Shell shell_news;

	/**
	 * Create the dialog.
	 * @param parent
	 * @param style
	 */
	public NewUpdates(Shell parent) {
		super(parent, SWT.DIALOG_TRIM |SWT.CENTER| SWT.APPLICATION_MODAL);
		//setText("SWT Dialog");
	}

	/**
	 * Open the dialog.
	 * @return the result
	 */
	public Object open() {
		createContents();
		shell_news.open();
		shell_news.layout();
		Display display = getParent().getDisplay();
		while (!shell_news.isDisposed()) {
			if (!display.readAndDispatch()) {
				display.sleep();
			}
		}
		return result;
	}

	/**
	 * Create contents of the dialog.
	 */
	private void createContents() {
		shell_news = new Shell(getParent(), getStyle());
		shell_news.setImage(SWTResourceManager.getImage(NewUpdates.class, "/com/images/news.ico"));
		shell_news.setSize(649, 548);
		shell_news.setText("\u65B0\u7248\u672C\u7279\u6027");
		shell_news.setLayout(new FillLayout(SWT.VERTICAL));
		
		Group group_20140215 = new Group(shell_news, SWT.NONE);
		group_20140215.setText("2014.02.15\u66F4\u65B0\u5217\u8868");
		group_20140215.setLayout(new FillLayout(SWT.HORIZONTAL));
		
		Label lblNewLabel_20140215_news = new Label(group_20140215, SWT.NONE);
		lblNewLabel_20140215_news.setText("* \u4FEE\u6539\u4E86\u975E\u82F1\u8BED\u7CFB\u7EDF\u8FD4\u56DE\u7684\u5F53\u524D\u65F6\u95F4\u6233\u4E0D\u662F\u82F1\u6587\u5B57\u7B26\u95EE\u9898\uFF1B\r\n* \u5728\u5217\u8F66\u8F66\u6B21\u67E5\u8BE2\u4E2D\u589E\u52A0\u5BF9\u5E94\u7684\u8F66\u6B21\u7684\u786C\u5EA7\u8F66\u7968\u6570\u76EE\uFF1B");
		
		Group group_20140216 = new Group(shell_news, SWT.NONE);
		group_20140216.setText("2014.02.16\u66F4\u65B0\u5217\u8868");
		group_20140216.setLayout(new FillLayout(SWT.HORIZONTAL));
		
		Label lblNewLabel_20140216_news = new Label(group_20140216, SWT.NONE);
		lblNewLabel_20140216_news.setText("1，在输入验证码后点击回车也可登录；\r\n2，增加删除旅客操作；\r\n3，校验你输入的查询条件是否正确，如果输入的查询车票日期非法，提示用户；\r\n4，移植代码到google code进行维护；\r\n5，增加更多的log日志分析错误；\r\n6，增加23:00-7：00维护时段的提示显示；\r\n7，增加订票成功的声音提醒；");
		
		Group group_20140218 = new Group(shell_news, SWT.NONE);
		group_20140218.setText("2014.02.18更新列表");
		group_20140218.setLayout(new FillLayout(SWT.HORIZONTAL));
		
		Label lblNewLabel_20140217_news = new Label(group_20140218, SWT.NONE);
		lblNewLabel_20140217_news.setText("1，关联旅客列表点击全选无响应问题；\r\n2，增加确认订单可以点击图片进行刷新验证码；\r\n3，修改查询列车中的历时时间显示错误问题；\r\n4，可查询学生票进行预订；\r\n5，增加自动填入验证码功能，可能会有些问题，还在修改中。如果不行，请使用手工输入；\r\n6，增加代理上网模式进行抢票；\r\n7，增加网络连接缓慢时，设置请求的超时时间；");

	}
}
